﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace SachOnlineLibrary.Public
{
    public class PhieuDatHang
    {
        private int maPhieu;

        public int MaPhieu
        {
            get { return maPhieu; }
            set { maPhieu = value; }
        }
        private int tKID;

        public int TKID
        {
            get { return tKID; }
            set { tKID = value; }
        }
        private DateTime ngay;

        public DateTime Ngay
        {
            get { return ngay; }
            set { ngay = value; }
        }
        private long tongTien;

        public long TongTien
        {
            get { return tongTien; }
            set { tongTien = value; }
        }
        private string trangThai;

        public string TrangThai
        {
            get { return trangThai; }
            set { trangThai = value; }
        }
        private string diaChi;

        public string DiaChi
        {
            get { return diaChi; }
            set { diaChi = value; }
        }
        public void ChuyenDoi(DataRow dr)
        {
            MaPhieu = int.Parse(dr[0].ToString());
            TKID = int.Parse(dr[1].ToString());
            Ngay = DateTime.Parse(dr[2].ToString());
            TongTien = long.Parse(dr[3].ToString());
            TrangThai = dr[4].ToString();
            DiaChi = dr[5].ToString();
        }
    }
}
